---
title: isoTimeSecond
description: Creates an ISO time second validation action.
source: /actions/isoTimeSecond/isoTimeSecond.ts
contributors:
  - fabian-hiller
---

import { ApiList, Property } from '~/components';
import { properties } from './properties';

# isoTimeSecond

Creates an [ISO time second](https://en.wikipedia.org/wiki/ISO_8601) validation action.

Format: `hh:mm:ss`

```ts
const Action = v.isoTimeSecond<TInput, TMessage>(message);
```

## Generics

- `TInput` <Property {...properties.TInput} />
- `TMessage` <Property {...properties.TMessage} />

## Parameters

- `message` <Property {...properties.message} />

### Explanation

With `isoTimeSecond` you can validate the formatting of a string. If the input is not an ISO time second, you can use `message` to customize the error message.

## Returns

- `Action` <Property {...properties.Action} />

## Examples

The following examples show how `isoTimeSecond` can be used.

### ISO time second schema

Schema to validate an ISO time second.

```ts
const IsoTimeSecondSchema = v.pipe(
  v.string(),
  v.isoTimeSecond('The time is badly formatted.')
);
```

## Related

The following APIs can be combined with `isoTimeSecond`.

### Schemas

<ApiList items={['any', 'custom', 'string']} />

### Methods

<ApiList items={['pipe']} />

### Utils

<ApiList items={['isOfKind', 'isOfType']} />
